import request from '@/utils/request'

export default {
  //医院列表
  getPageList(pageNum, pageSize, searchObj) {
    return request ({
      url: `/admin/hosp/hospital/list/${pageNum}/${pageSize}`,
      method: 'get',
      params: searchObj  
    })
  },
  //根据dictCode查询下级数据字典
  findByDictCode(dictCode) {
    return request({
        url: `/admin/cmn/dict/getDictByDictCode/${dictCode}`,
        method: 'get'
      })
    },
  
  //根据id查询下级数据字典
  findByParentId(id) {
    return request({
        url: `/admin/cmn/dict/getChildDataById/${id}`,
        method: 'get'
      })
  },
  // 更新医院的状态
  updateHospitalStatus(id, status) {
    return request({
        url: `/admin/hosp/hospital/updateHospitalStatus/${id}/${status}`,
        method: 'get'
      })
  },
  // 获取医院的详细配置
  findHospDetailById(id) {
      return request({
        url: `/admin/hosp/hospital/hospdetail/${id}`,
        method: 'get'
      })
  },
  findDepartmentList(hoscode) {
      return request({
        url: `/admin/hosp/department/findDepartmentList/${hoscode}`,
        method: 'get'
      })
  },
  // 获取排班信息
  getScheduleRule(pageNum, pageSize, hoscode, depcode) {
      return request({
        url: `/admin/hosp/schedule/findScheduleRule/${pageNum}/${pageSize}/${hoscode}/${depcode}`,
        method: 'get'
      })
  },
  // 获取排班信息详情内容
  findScheduleDetail(hoscode, depcode, workDate) {
    return request({
        url: `/admin/hosp/schedule/findScheduleDetail/${hoscode}/${depcode}/${workDate}`,
        method: 'get'
      })
}
}